<template>
  <div>测试页</div>
</template>

<script>
export default {
  data() {
    return {
      student: {
        name: '王小明',
        age: 666,
        addresss: '珠几路58号'
      }
    }
  },
  watch: {
    // student: {
    //   handler() {
    //     console.log('student发生了变化')
    //   },
    //   deep: true
    // }
    'student.age': function() {
      console.log('age发生了变化')
    }

  },
  created() {
    setTimeout(() => {
      this.student.age = 18
    }, 1000)
  }

}
</script>

<style>

</style>
